home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _GUICtrlComboResetContent.au3 < prev    next >
Text File  |  2006-06-17  |  683b  |  26 lines

  1. #include <GuiConstants.au3>
  2. #include <GuiCombo.au3>
  3.  
  4. Opt('MustDeclareVars',1)
  5.  
  6. Dim $Combo,$ret,$Btn_Exit,$msg,$allocated,$Btn_Clear
  7.  
  8. GuiCreate("ComboBox Reset Content", 392, 254)
  9.  
  10. $Combo = GuiCtrlCreateCombo("", 70, 10, 270, 100,$CBS_SIMPLE)
  11. $allocated = _GUICtrlComboInitStorage($Combo, 26, 50)
  12. $ret = _GUICtrlComboAddDir($Combo,"drives")
  13. $Btn_Clear = GUICtrlCreateButton("Reset Content",150,140,90,30)
  14. $Btn_Exit = GuiCtrlCreateButton("Exit", 150, 180, 90, 30)
  15. GuiSetState()
  16. While 1
  17.     $msg = GuiGetMsg()
  18.     Select
  19.         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
  20.             ExitLoop
  21.         Case $msg = $Btn_Clear
  22.             _GUICtrlComboResetContent($Combo)
  23.     EndSelect
  24. WEnd
  25. Exit
  26.